using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Entity;

namespace Bussiness
{
    public static class CompanyManage
    {
        public static List<Company> GetCompanyAll()
        {
            List<Company> result = new List<Company>();
            using (IDataReader reader = DataAccess.DB().ExecuteReader(CommandType.StoredProcedure, "usp_SelectT_CompaniesAll"))
            {
                while (reader.Read())
                {
                    Company tmp = new Company(reader[0], reader[1]);
                    result.Add(tmp);

                }
            }

            return result;
        }
    }
}
